The present invention relates to packaging machines of the type adapted to handle groups of articles on flat tray blanks which tray blanks have leading and trailing flaps to be folded in a conventional fashion, and side flaps that are glued and folded against corner tabs provided on these leading and trailing flaps. More specifically, the present invention relates to a unique side flap folding and gluing mechanism capable of abrupt shut-down of the machine without leaving the side flaps unfolded after being glued. Normally a tray can be stopped at the glue station prior to entry into the conventional compression section of the machine, and will be left unfolded but glued. Such a situation requires intervention by the machine operator before the machine can be restarted.